package com.share.user.api.factory;

import com.share.common.core.domain.R;
import com.share.user.api.domain.UpdateUserLogin;
import com.share.user.api.domain.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @
 * @descriptions: RemoteUserInfoService
 * @author: LiYang
 * @date: 2025/7/1 11:22
 * @version: 1.0
 */
@FeignClient(contextId = "remoteUserInfoService", name = "share-user", fallbackFactory = RemoteShareUserServiceFallbackFactory.class)
public interface RemoteUserInfoService {
    @GetMapping("/userInfo/wxLogin/{code}")
    R<UserInfo> wxLogin(@PathVariable("code") String code);

    @PutMapping("/userInfo/updateUserLogin")
    R<Boolean> updateUserLogin(@RequestBody UpdateUserLogin updateUserLogin);
    @GetMapping("/userInfo/getUserInfo/{userId}")
    R<UserInfo> getUserInfo(@PathVariable("userId") Long userId, @RequestHeader("from") String source);
}
